<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>欢迎，请登陆</title>

    <link type="text/css" rel="stylesheet" href="/css/all.css"/>
    <script language="javascript" src="/js/all.js"></script>
</head>
<body style="background-color: #444;">
    <div class="middle">
        <div style="font-size: 1.8em; font-weight: bold; text-align: center;">
            <span style="color: white">Spring</span>
            <span style="color: red">Cloud</span>
        </div>
        <div style="width: 25em; margin: 1em auto 0;">
            <div class="box box-primary">
                <form >
                    <div class="box-header with-border" style="padding: 10px 15px;">您已经通过身份验证，请确认授权</div>
                    <div id="scopes" class="box-body" style="padding: 15px 15px;"></div>
                    <div class="box-footer" style="padding: 10px 15px;">
                        <input id="confirm" type="submit" class="btn btn-primary pull-right" value="授权">
                    </div>
                </form>
            </div>
        </div>
    </div>

    <script language="JavaScript">
        var scope = getUrlParam("scope");
        var scopeList = scope.split(" ");
        var html = "<input type=\"hidden\" name=\"user_oauth_approval\" value=\"true\">";
        for (var i = 0; i < scopeList.length; i++) {
            html += scopeList[i] + "：<input type='checkbox' class='icheckbox_polaris' name='scope." + scopeList[i] + "' value='true'/><br />";
        }
        $("#scopes").html(html)
        $("form").attr("action", urls.backend.oauth2Server.authorize).attr("method", "POST");
    </script>

    <script language="JavaScript">
        $('input').iCheck({
            checkboxClass: 'icheckbox_polaris',
            radioClass: 'iradio_polaris',
            increaseArea: '-10%' // optional
        });
    </script>
</body>
</html>